<?php

namespace App\Http\Controllers;

use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Http;

class GswController extends Controller
{
    public function index()
    {
        $url = 'https://www.gushiwen.cn/viewplay.aspx?id=' . Arr::random(__('gsw'));
        $response = Http::get($url);
        return view('gsw', [
            'obj' => json_decode($response->getBody()->getContents()),
        ]);
    }
}
